-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alternative group claim #5
base: master
Are you sure you want to change the base?
Conversation
@@ -132,6 +139,20 @@ public Principal getUserPrincipal() { | |||
|
|||
@Override | |||
public boolean isUserInRole(final String role) { | |||
if (tokenExtractor.get().containsClaim(groupsName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets dont call get twice ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
JsonValue jsonValue = tokenExtractor.get().getClaim(groupsName); | ||
Set<String> groups = Collections.EMPTY_SET; | ||
if (jsonValue.getValueType() == JsonValue.ValueType.ARRAY) { | ||
groups = JsonArray.class.cast(jsonValue).stream() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asJsonArray?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Hi, two open questions:
|
What I do like, is the hierarchy to locatie the groups claim. The example Token1.json in the tck includes an example with customObject. |
|
Aha, thanks. |
@rmannibucau please review and feedback